import Vue from 'vue'
import Vuex from 'vuex'
import state from './state'
import getters from './getters'
import mutations from './mutations'
import actions from './actions'
import user from './modules/user' // 引入user模块
import { saveInLocal } from './plugin/saveInLocal'
Vue.use(Vuex)

export default new Vuex.Store({
  // 不要在发布环境下启用严格模式！
  strict: process.env.NODE_ENV !== 'production',
  state,
  getters,
  mutations,
  actions,
  modules: {
    user // 引入user模块
  },
  plugins: [saveInLocal]
})
